<?php
    class Www_StaticController extends \WZ_controller
    {
        protected $_em;
        protected $_app;
        protected $_bootstrap;
        public $_request;

        public function _initController()
        {
            $this->_app = self::getApp();
            $this->_em = $this->getEm();
            $this->_bootstrap = $this->getBootstrap();
            $this->_request = $this->getRequest();
        }
        
        public function indexAction()
        {
            // $this->_app->cached(3600);
            \WZ_Seo::set('title', 'Accueil');
            $model = new \WZModel_Test_Book;
            $crud = \WZ_Crud::factory($model);
            $this->view->createForm = $crud::create();
            $this->view->createFormStatus = $crud::$_status;
            
            $bookList = \WZList_Test_Book::render();
            $this->view->booklist = $bookList::$_render;
        }
        
        public function is404Action()
        {
            // $this->_app->cached(7200);
            \WZ_Seo::set('title', 'Page inconnue');
        }
        
        public function isErrorAction()
        {
            // $this->_app->cached(7200);
            \WZ_Seo::set('title', 'Page erreur');
        }
    }